package com.mes.cloud.dao;

import com.mes.cloud.api.dto.request.position.SysPositionOrgAuthRequest;
import com.mes.cloud.entity.SysPositionOrganizationAuth;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.ids.SelectByIdsMapper;

import java.util.List;

/**
 * 岗位组织授权关联表
 *
 * @author xy
 * @version 2019-08-02 14:16:11
 * @email yuan.xue3@pactera.com
 */
public interface SysPositionOrganizationAuthDao extends SelectByIdsMapper<SysPositionOrganizationAuth>, Mapper<SysPositionOrganizationAuth> {
    /**
     * <批量插入>
     *
     * @param sysPositionOrganizationAuth
     * @return int
     * @author xy
     * @date 2019/8/6 16:03
     */
    int batchInsert(List<SysPositionOrganizationAuth> sysPositionOrganizationAuth);

    /**
     * <根据岗位id更新>
     *
     * @param sysPositionOrgAuthRequest
     * @return int
     * @author xy
     * @date 2019/8/8 15:09
     */
    int updateByPositionId(SysPositionOrgAuthRequest sysPositionOrgAuthRequest);


    /**
     * <通过岗位查询组织>
     *
     * @param positionIds
     * @return List<String>
     * @author xy
     * @date 2019/9/10 8:30
     */
    List<String> getOrganizationIdList(List<String> positionIds);

    /**
     *  组织下所有员工的号
     * @param listChildren
     * @return
     */
    List<String> getEmployeeNoList(@Param("listChildren") List<String> listChildren);
}
